Many computer paint and drawing programs allow a user to fill an area with a single and or multiple colors. In the case of multiple colors, computer paint programs can automatically blend between the colors specified. This smooth blending between colors produces a color gradient. Conventional types of color gradients include linear gradients, radial gradients, and gradient meshes. All this same can be said for opacity gradients.
To fill a region with a linear gradient (whether color or opacity or both), a line segment is specified (e.g., on a virtual drawing canvas) and colors are associated with points along the line segment. For example, one endpoint of the line segment can be mapped to blue, the other endpoint can be mapped to red, and an intermediate point on the line segment can be mapped to yellow. The color and or opacity at any other point on the line segment is determined by interpolating (e.g., using linear or cubic interpolation or other methods known to those skillet in the arts) between the specified rotors.
At any other point in the region to be filled, the color is defined to be the same as the color of the point on the line segment which creates a perpendicular bisector to the line segment with the point in question. The user can choose multiple colors along the line segment and can generally specify the technique used to interpolate between colors (or select a conventional program that employs the desired technique), but a linear gradient is defined by a single line segment. The linear gradient is the most basic gradient of all and is typically not complex enough for advanced effects.
Radial gradients can be used to create slightly more complex effects than linear gradients. To create a radial gradient, a line segment is specified by selecting an initial point and an endpoint. As with linear gradients, colors and or opacities are associated with points along the line segment, and the color/opacity of any intermediate point on the line segment is determined by interpolating between the specified colors.
However unlike linear gradients, the color of any other point in the region to be filled is determined according to its distance from the initial point of the line segment. Thus, the resulting radial gradient comprises generally concentric rings of color that vary smoothly and continuously. Along the initial line segment, colors blend smoothly as they do in the ease of linear gradients. Points on other rays that begin at the initial point are colored to the same way (as the initial line segment), according to their distance from the initial point.
A gradient mesh is created using a two dimensional Bezier surface, specified by a mesh of control points, which are the intersections of line segments imposed upon the surface, each of which control points is associated with a color and or opacity. Each point in the region to be filled is colored by interpolating between the colors of nearby control points, using standard Bezier surface evaluation. The mesh gradient is more advanced than both linear and radial gradients; however, complex mesh gradients put a heavy burden on a user, as complex gradations can only be achieved by specifying the positions and colors of many control points.
Thus, linear and radial gradients are easy to use and to specify, but they typically generate staple color patients. A gradient mesh is more powerful, but is more difficult for designers to use. For example, as one author notes, in order to imitate the smooth gradation of color produced by an airbrush, the user is forced to think about increasing the complexity of the control mesh. It is also difficult to define a mesh gradient to fill a non-rectangular region, since Bezier surfaces are typically defined using quadrilateral meshes. Achieving a desired appearance is also time-consuming and non-intuitive, since more complicated effects generally require the user to individually move and color many control points.
Existing tools, which rely on a strict mesh, suffer from a number of drawbacks. For example, when the desired number of colors and opacities differs across the set of lines that make up the mesh, unnecessary control points are automatically generated (mesh intersections) and may need manual configuration and or removal by the user. Existing tools may interpolate the color/opacity values of the new control points such that the result appears acceptable. However, the existence of these additional control points may adversely affect the user's ability to make additional modifications to the effect.
Another drawback of conventional mesh tools is that positional adjustments made to the control points result in skewing of the cells and in noticeable distortion of the blending effect from any introduced curvature. Furthermore, conventional mesh tools do not provide a mechanism for applying the resulting effect in a repeated manner.
What is needed is a simplification of the process of creating multidimensional color and opacity gradations, and a method by which these gradations can be applied repeatedly. What is needed is a system that provides multiple single-path color and opacity gradients independently from each other that may then be combined programmatically to create color/opacity gradations along multiple paths.